<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        table {border-collapse: collapse; font-size: 14px; width: 80%; margin: auto}
        table, th, td {border: 1px solid darkslategray;padding: 10px}
    </style>
</head>
<body>
<div style="text-align: center">
    <span style="color: darkslategray; font-size: 30px">部门</span>
    <hr/>
    <table class="list">
        <tr>
            <th>部门id</th>
            <th>部门名称</th>
            <th>操作</th>
        </tr>
        <tr th:each="dept : ${dept}">
            <td th:text="${dept.deptid}">1</td>
            <td th:text="${dept.deptname}">zhangsan</td>
            <td><a class="btn btn-primary" th:href="@{'/dept/findDeptById/'+${dept.deptid}}">更改</a>
                <a class="btn btn-danger" th:href="@{'/dept/delDept/'+${dept.deptid}}">删除</a>
            </td>
        </tr>
    </table>
    <a href="/dept/toadd" th:href="@{/dept/toadd}">添加部门</a>

</div>
</body>
</html>